3.137 \(\int x (a+b \tanh ^{-1}(\frac{c}{x})) \, dx\)

Optimal. Leaf size=39 \[ \frac{1}{2} x^2 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )-\frac{1}{2} b c^2 \tanh ^{-1}\left (\frac{x}{c}\right )+\frac{b c x}{2} \]

[Out]

(b*c*x)/2 + (x^2*(a + b*ArcTanh[c/x]))/2 - (b*c^2*ArcTanh[x/c])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0202438, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {6097, 193, 321, 207} \[ \frac{1}{2} x^2 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )-\frac{1}{2} b c^2 \tanh ^{-1}\left (\frac{x}{c}\right )+\frac{b c x}{2} \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*ArcTanh[c/x]),x]

[Out]

(b*c*x)/2 + (x^2*(a + b*ArcTanh[c/x]))/2 - (b*c^2*ArcTanh[x/c])/2

Rule 6097

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
nh[c*x^n]))/(d*(m + 1)), x] - Dist[(b*c*n)/(d*(m + 1)), Int[(x^(n - 1)*(d*x)^(m + 1))/(1 - c^2*x^(2*n)), x], x
] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]

Rule 193

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b}, x] && LtQ[n, 0]
 && IntegerQ[p]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int x \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right ) \, dx &=\frac{1}{2} x^2 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{2} (b c) \int \frac{1}{1-\frac{c^2}{x^2}} \, dx\\ &=\frac{1}{2} x^2 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{2} (b c) \int \frac{x^2}{-c^2+x^2} \, dx\\ &=\frac{b c x}{2}+\frac{1}{2} x^2 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{2} \left (b c^3\right ) \int \frac{1}{-c^2+x^2} \, dx\\ &=\frac{b c x}{2}+\frac{1}{2} x^2 \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right )-\frac{1}{2} b c^2 \tanh ^{-1}\left (\frac{x}{c}\right )\\ \end{align*}

Mathematica [A]  time = 0.007661, size = 56, normalized size = 1.44 \[ \frac{a x^2}{2}+\frac{1}{4} b c^2 \log (x-c)-\frac{1}{4} b c^2 \log (c+x)+\frac{1}{2} b x^2 \tanh ^{-1}\left (\frac{c}{x}\right )+\frac{b c x}{2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*ArcTanh[c/x]),x]

[Out]

(b*c*x)/2 + (a*x^2)/2 + (b*x^2*ArcTanh[c/x])/2 + (b*c^2*Log[-c + x])/4 - (b*c^2*Log[c + x])/4

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 53, normalized size = 1.4 \begin{align*}{\frac{a{x}^{2}}{2}}+{\frac{b{x}^{2}}{2}{\it Artanh} \left ({\frac{c}{x}} \right ) }+{\frac{xbc}{2}}+{\frac{{c}^{2}b}{4}\ln \left ({\frac{c}{x}}-1 \right ) }-{\frac{{c}^{2}b}{4}\ln \left ( 1+{\frac{c}{x}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*arctanh(c/x)),x)

[Out]

1/2*a*x^2+1/2*arctanh(c/x)*b*x^2+1/2*x*b*c+1/4*c^2*b*ln(c/x-1)-1/4*c^2*b*ln(1+c/x)

________________________________________________________________________________________

Maxima [A]  time = 0.969734, size = 59, normalized size = 1.51 \begin{align*} \frac{1}{2} \, a x^{2} + \frac{1}{4} \,{\left (2 \, x^{2} \operatorname{artanh}\left (\frac{c}{x}\right ) -{\left (c \log \left (c + x\right ) - c \log \left (-c + x\right ) - 2 \, x\right )} c\right )} b \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctanh(c/x)),x, algorithm="maxima")

[Out]

1/2*a*x^2 + 1/4*(2*x^2*arctanh(c/x) - (c*log(c + x) - c*log(-c + x) - 2*x)*c)*b

________________________________________________________________________________________

Fricas [A]  time = 1.68662, size = 90, normalized size = 2.31 \begin{align*} \frac{1}{2} \, b c x + \frac{1}{2} \, a x^{2} - \frac{1}{4} \,{\left (b c^{2} - b x^{2}\right )} \log \left (-\frac{c + x}{c - x}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctanh(c/x)),x, algorithm="fricas")

[Out]

1/2*b*c*x + 1/2*a*x^2 - 1/4*(b*c^2 - b*x^2)*log(-(c + x)/(c - x))

________________________________________________________________________________________

Sympy [A]  time = 0.486917, size = 36, normalized size = 0.92 \begin{align*} \frac{a x^{2}}{2} - \frac{b c^{2} \operatorname{atanh}{\left (\frac{c}{x} \right )}}{2} + \frac{b c x}{2} + \frac{b x^{2} \operatorname{atanh}{\left (\frac{c}{x} \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*atanh(c/x)),x)

[Out]

a*x**2/2 - b*c**2*atanh(c/x)/2 + b*c*x/2 + b*x**2*atanh(c/x)/2

________________________________________________________________________________________

Giac [A]  time = 1.14094, size = 72, normalized size = 1.85 \begin{align*} -\frac{1}{4} \, b c^{2} \log \left (c + x\right ) + \frac{1}{4} \, b c^{2} \log \left (c - x\right ) + \frac{1}{4} \, b x^{2} \log \left (-\frac{c + x}{c - x}\right ) + \frac{1}{2} \, b c x + \frac{1}{2} \, a x^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctanh(c/x)),x, algorithm="giac")

[Out]

-1/4*b*c^2*log(c + x) + 1/4*b*c^2*log(c - x) + 1/4*b*x^2*log(-(c + x)/(c - x)) + 1/2*b*c*x + 1/2*a*x^2